<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<form id="pagerForm" action="getUserOrders">
	<div id="chedkBoxValues" style="display: none"></div>
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" /> 
	<input type="hidden" name="pageNum" value="${page.currentPage }" /> 
	<input type="hidden" name="pageSize" value="${page.pageSize }" />
	<input type="hidden" name="userId" value="${userId}">
</form>

<div class="pageHeader">
	<form  action="" method="post">
		<div class="pageHeader">
			<input type="hidden" name="init" value=0>
			<div class="searchBar">
				<table class="searchContent">
					<tr>
						<td>用户名: ${user.username}
					</tr>
				</table>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<table class="list" layoutH="118" targetType="dialog" width="100%">
		<thead>
			<tr>
				<th align="center">序号</th>
				<th align="center">礼券名称</th>
				<th align="center">礼券面值</th>
				<th align="center">生效日期</th>
				<th align="center">过期日期</th>
				<th align="center">是否使用</th>
				<th align="center">创建时间</th>
			</tr>
		</thead>
		<tbody>
		<s:iterator var="giftCertificates" value="page.data" status="st">
			<tr target="sid_support" rel="<s:property value="#orders.id" />">
				<th width="1%" align="center"><s:property
						value="page.pageSize * (page.currentPage-1) + #st.index + 1" /></th>
				<th width="3%" align="left"><s:property value="#giftCertificates.giftName" />
				</th>
				<th width="3%" align="left"><s:property value="#giftCertificates.giftMoney" />
				</th>
				<th width="3%" align="left"><s:date name="#giftCertificates.giftCommencement" format="yyyy-MM-dd"/>
				</th>
				<th width="3%" align="left"><s:date name="#giftCertificates.giftEndDate" format="yyyy-MM-dd"/>
				</th>
				<th width="3%" align="center">
					<s:if test="#giftCertificates.isUse==0">
						<span style="color:red">未使用</span>
					</s:if>
					<s:elseif test="#giftCertificates.isUse==1">
						<span style="color:blue">已使用</span>
					</s:elseif>
				</th>
				<th width="3%" align="left"><s:date name="#giftCertificates.giftCreateDate" format="yyyy-MM-dd HH:mm:ss"/>
				</th>
			</tr>
		</s:iterator>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>共${page.totalNum }条，共${page.totalPage }页</span>
		</div>
		<div class="pagination" targetType="dialog" totalCount="${page.totalNum }" numPerPage="${page.pageSize }" pageNumShown="10" currentPage="${page.currentPage }"></div>
	</div>
</div>

